<ui:composition  xmlns="http://www.w3.org/1999/xhtml"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:h="http://java.sun.com/jsf/html"
                 xmlns:f="http://java.sun.com/jsf/core"
                 xmlns:a4j="http://richfaces.org/a4j"
                 xmlns:rich="http://richfaces.org/rich">
    <h:form>
        <rich:panel header="工资数据导入" styleClass="content-hight">
            <h:panelGrid columns="2">
                <h:outputText value="账套"/>
                <h:selectOneMenu  id="iAcct" value="#{psnSalaBean.salaType}">
                    <f:selectItem itemValue="" itemLabel="-请选择-"/>
                    <f:selectItems value="#{psnSalaBean.accts}"/>
                    <a4j:ajax event="change" listener="#{psnSalaBean.acctChanged}" render="button,iYear"/>
                </h:selectOneMenu>
                <h:outputText value="年度"/>
                <h:selectOneMenu  id="iYear" value="#{psnSalaBean.year}">
                    <f:selectItem itemValue="" itemLabel="-请选择-"/>
                    <f:selectItems value="#{psnSalaBean.iyears}"/>
                    <a4j:ajax event="change" render="button"/>
                </h:selectOneMenu>
                <h:outputText value="月份"/>
                <h:selectOneMenu  id="iMonth" value="#{psnSalaBean.month}">
                    <f:selectItem itemValue="" itemLabel="-请选择-"/>
                    <f:selectItems value="#{psnSalaBean.monthes}"/>
                    <a4j:ajax event="change" render="button"/>
                </h:selectOneMenu>
            </h:panelGrid>
            <a4j:commandButton id="button" value="确定"
                               disabled="#{empty psnSalaBean.salaType
                                           or empty psnSalaBean.year
                                           or empty psnSalaBean.month}"
                               action="#{psnSalaBean.impSalaData}"
                               onclick="this.disabled = 'true';"
                               style="padding: 3px 5px 3px 5px"
                               render="message,@this"/>
            <rich:messages/>
            <a4j:status onstart="#{rich:component('statPane')}.show()"
                        onstop="#{rich:component('statPane')}.hide()" />
            <rich:popupPanel id="statPane" autosized="true">
                <h:graphicImage value="/resource/images/ai.gif" />
                请稍等...
            </rich:popupPanel>
        </rich:panel>
    </h:form>
</ui:composition>